home *** CD-ROM | disk | FTP | other *** search
/ Aminet 6 / Aminet 6 - June 1995.iso / Aminet / dev / gui / VisualArts2_2.lha / VisualArts / VAInstall / VisualArts.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-02  |  5.4 KB  |  197 lines

  1. /*
  2. **  $Filename: VisualArts.h $
  3. **  $Includes, V2.2 $
  4. **  $Date: 95/03/15$
  5. **
  6. **
  7. **  (C) 1994 Danny Y. Wong              
  8. **  All Rights Reserved
  9. **
  10. **  DO NOT MODIFY
  11. */
  12.  
  13. #include <exec/types.h>
  14. #include <exec/memory.h>
  15. #include <exec/lists.h>
  16. #include <exec/nodes.h>
  17. #include <exec/ports.h>
  18. #include <exec/devices.h>
  19. #include <exec/io.h>
  20. #include <exec/libraries.h>
  21.  
  22. #include <devices/console.h>
  23. #include <devices/serial.h>
  24. #include <devices/clipboard.h>
  25.  
  26. #include <intuition/intuition.h>
  27. #include <intuition/intuitionbase.h>
  28. #include <intuition/gadgetclass.h>
  29. #include <intuition/imageclass.h>
  30. #include <intuition/classes.h>
  31. #include <intuition/icclass.h>
  32. #include <intuition/sghooks.h>
  33.  
  34. #include <graphics/displayinfo.h>
  35. #include <graphics/gfxbase.h>
  36. #include <graphics/gfxmacros.h>
  37. #include <graphics/text.h>
  38.  
  39. #include <libraries/gadtools.h>
  40. #include <libraries/dos.h>
  41. #include <libraries/asl.h>
  42. #include <libraries/dosextens.h>
  43.  
  44. #include <workbench/workbench.h>
  45. #include <workbench/startup.h>
  46.  
  47. #include <clib/wb_protos.h>
  48. #include <clib/exec_protos.h>
  49. #include <clib/intuition_protos.h>
  50. #include <clib/gadtools_protos.h>
  51. #include <clib/graphics_protos.h>
  52. #include <clib/utility_protos.h>
  53. #include <clib/alib_protos.h>
  54. #include <clib/dos_protos.h>
  55. #include <clib/asl_protos.h>
  56.  
  57. #include "string.h" 
  58. #include "stdio.h"
  59. #include "stdlib.h"
  60. #include "ctype.h"
  61.  
  62. #include "PopUpMenuClass.h" 
  63.  
  64. /* screemode flags */
  65.  
  66. #define ASLSM_INITIALAUTOSCROLL         1
  67. #define ASLSM_INITIALINFOOPENED         2
  68. #define ASLSM_DOWIDTH                   4
  69. #define ASLSM_DOHEIGHT                  8
  70. #define ASLSM_DODEPTH                   16
  71. #define ASLSM_DOOVERSCANTYPE            32
  72. #define ASLSM_DOAUTOSCROLL              64
  73. #define ASLSM_SLEEPWINDOW               128
  74.  
  75. /* font requester flags */
  76.  
  77. #define ASLFO_SLEEPWINDOW               1
  78. #define ASLFO_DOFRONTPEN                2
  79. #define ASLFO_DOBACKPEN                 4
  80. #define ASLFO_DOSTYLE                   8
  81. #define ASLFO_DODRAWMODE                16
  82. #define ASLFO_FOXEDWIDTHONLY            32
  83.  
  84. /* file requester flags */
  85.  
  86. #define ASLFR_DOSAVEMODE                1
  87. #define ASLFR_DOMULTISELECT             2
  88. #define ASLFR_DOPATTERNS                4
  89. #define ASLFR_DRAWERSONLY               8
  90. #define ASLFR_REJECTICONS               16
  91. #define ASLFR_FILTERDRAWERS             32
  92. #define ASLFR_SLEEPWINDOW               64
  93.  
  94.  
  95. /* to adjust the GUI if the window title is other than topaz 8
  96. */
  97. #define kWindowOffSetY  (Scr->Font->ta_YSize - 8)
  98.  
  99. /* context sensitive */
  100.  
  101. #define VA_Static       0x0001
  102. #define VA_ExpandX      0x0002
  103. #define VA_MoveX        0x0004
  104. #define VA_ExpandY      0x0008
  105. #define VA_MoveY        0x0010
  106.  
  107. /* defines for scroller window with super bitmap */
  108.  
  109. #define MAX_LEVEL          (0xFFFFL)
  110. #define LAYERXOFFSET(win)  (win->RPort->Layer->Scroll_X)  
  111. #define LAYERYOFFSET(win)  (win->RPort->Layer->Scroll_Y)  
  112.  
  113. /* clip board */
  114. struct cbbuf {
  115.  
  116.         ULONG size;     /* size of memory allocation            */
  117.         ULONG count;    /* number of characters after stripping */
  118.         UBYTE *mem;     /* pointer to memory containing data    */
  119. };
  120.  
  121. /* define for Image */
  122.  
  123. #ifndef IM
  124. #define IM(o)    ((struct Image *) o)
  125. #endif
  126.  
  127. /* define for determining the max value */
  128.  
  129. #ifndef MAX
  130. #define MAX(x,y) ((x) > (y) ? (x) : (y))
  131. #endif
  132.  
  133. /* for new menus in V38  */
  134.  
  135. #ifndef WA_NewLookMenus
  136.   #define WA_NewLookMenus         (WA_Dummy + 0x30)
  137. #endif
  138.  
  139. #ifndef  GTMN_NewLookMenus
  140. #define GTMN_NewLookMenus    GT_TagBase+67 /* ti_Data is boolean */
  141. #endif
  142.  
  143. #ifndef WFLG_NEWLOOKMENUS
  144. #define WFLG_NEWLOOKMENUS   0x00200000    /* window has NewLook menus    */
  145. #endif
  146.  
  147. /* macros for easy access to Gadget data */
  148.  
  149. #define GetString(gad)            (((struct StringInfo *)gad->SpecialInfo)->Buffer)
  150. #define GetUndoString(gad)    (((struct StringInfo *)gad->SpecialInfo)->UndoBuffer)
  151. #define GetNumber(gad)            (((struct StringInfo *)gad->SpecialInfo)->LongInt)
  152.  
  153. /* List node name.  Each node have the following */
  154.   
  155. struct NameNode
  156. {
  157.   struct Node nn_Node;  /* linked list node to previous or next node  */
  158.   UBYTE nn_Data[255];   /* name of the node, this is the same as      */
  159.                         /* nn_Node.ln_Name                            */
  160. };
  161.  
  162. /* Visual Arts message object.  Every GADGETUP event, the object is
  163.    sent to the attached function.  For Menus, the va_Gadget field is
  164.    always NULL.
  165. */
  166.  
  167. struct VAobject {
  168.   struct Window *va_Window;           /* window the object originated     */
  169.   struct Gadget *va_Gadget;           /* the gadget that sent this object */
  170.   struct IntuiMessage *va_IntuiMsg;   /* the IntuiMessage                 */
  171.   ULONG va_Flags;                     /* user flags                       */
  172.   APTR va_UserData;                   /* user data, function pointer etc..*/
  173. };
  174.  
  175. /* Every AREXX command have the following */
  176.  
  177. struct rexxCommandList
  178. {
  179.   char *name;       /* name of the AREXX command, note its case sensitive */
  180.   APTR userdata;    /* user data, in this case it's a function pointer    */ 
  181. };
  182.  
  183. /* Structure for Multi-Processing windows.  This structure is a linked
  184.    List for every window opened as Multi-Processing
  185. */
  186.  
  187. struct WindowNode
  188. {
  189.     struct Node nn_Node;            /* linked list to prev or next window */
  190.     UBYTE nn_Data[80];              /* window name */
  191.     struct Window *nn_Window;       /* window pointer */
  192.     struct AppWindow *nn_AppWindow; /* AppWindow pointer if window is a AppWindow */
  193.     struct MsgPort *nn_AppWindPort; /* AppWindow Port */
  194.     short ID;                       /* WindowNode ID  */
  195.     APTR UserData;                  /* window Handler for this window */
  196. };
  197.